<script setup>
import useHomeStore from '@/stores/modules/counter.js'
const homeStore = useHomeStore()
const addcount = () => {
  // homeStore.count++
  homeStore.accumulate()
}
function resetState() {
  homeStore.$reset()
}
</script>

<template>
  <div>
    123123123
    <h2>{{ homeStore.count }}</h2>
    <h2>count双倍：{{ homeStore.doubleCount }}</h2>
    <h2>getter使用另外一个getter{{ homeStore.doubleCountAddOne }}</h2>
    <h2>找到规定值：{{ homeStore.getFriendById(1) }}</h2>
    <button @click="addcount"> +1</button>
    <button @click="resetState">重置</button>
  </div>
</template>

<style lang="less" scoped>

</style>
